package com.zs.device;

import com.zs.ICallBack;
import com.zs.client.ServiceClient;
import com.zs.manager.CallBackManager;

public class Device {
	private String deviceName;
	private ICallBack callback;
	
	private CallBackManager callBackManager;
	
	public Device(String deviceName){
		this.deviceName=deviceName;
		callBackManager=CallBackManager.getInstance();
	}

	public void setCallBack(ICallBack callback){
		this.callback=callback;
	}
	
	public void sendMessage(String message){
		System.out.println(deviceName+"-->send msg:"+message);
		callBackManager.setCallBack(100, callback);
	}
}
